# Auth模块
file(GLOB AUTH_SOURCES *.cpp)
file(GLOB AUTH_HEADERS *.h)

add_library(auth ${AUTH_SOURCES} ${AUTH_HEADERS})
target_include_directories(auth PUBLIC
    ${CMAKE_CURRENT_SOURCE_DIR}/../../include/auth
)

# 依赖项
find_package(Poco REQUIRED COMPONENTS Foundation Net JWT)
target_link_libraries(auth PRIVATE
    Poco::Foundation
    Poco::Net
    Poco::JWT
    core  # 依赖core模块
)

# 安装规则
install(TARGETS auth DESTINATION lib)
install(FILES ${AUTH_HEADERS} DESTINATION include/auth)